﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Drawing;

namespace Paint
{
    class HinhTron:HinhVe
    {
        public HinhTron(HinhVe HV)
        {
            this._bimap = HV.Bimap;
            this._graphics = Graphics.FromImage(this._bimap);
            this._pen = HV.Pen;
        }

        public override void VeHinh()
        {
            int d1 = Math.Abs(DiemDau.X-DiemCuoi.X);
            int d2 = Math.Abs(DiemDau.Y - DiemCuoi.Y);
            Graphics.DrawEllipse(Pen, Math.Min(DiemDau.X , DiemCuoi.X), 
                                        Math.Min(DiemDau.Y, DiemCuoi.Y), d1, d2);
        }
    }
}
